﻿using System;
using System.ComponentModel;

namespace OCESandbox
{
    [Serializable]
    public class ClassInformation:INotifyPropertyChanged
    {
        private bool _GenerateObservableCollection;
        private bool _GenerateDuplicateAware;
        private bool _GenerateObservableEntity;

        public string Namespace { get; set; }
        public string Name { get; set; }

        public bool GenerateObservableCollection
        {
            get
            {
                return _GenerateObservableCollection;
            }
            
            set
            {
                _GenerateObservableCollection = value;
                OnPropertyChanged("GenerateObservableCollection");
                OnPropertyChanged("GenerateDuplicateAware");
                OnPropertyChanged("GenerateObservableEntity");
            }
        }
        public bool GenerateDuplicateAware
        {
            get
            {
                return _GenerateDuplicateAware;

            }
            set
            {
                _GenerateDuplicateAware = value;
                OnPropertyChanged("GenerateObservableCollection");
                OnPropertyChanged("GenerateDuplicateAware");
                OnPropertyChanged("GenerateObservableEntity");
            }
        }
        public bool GenerateObservableEntity
        {
            get
            {
                return _GenerateObservableEntity;
            }
            set
            {
                _GenerateObservableEntity = value;
                OnPropertyChanged("GenerateObservableCollection");
                OnPropertyChanged("GenerateDuplicateAware");
                OnPropertyChanged("GenerateObservableEntity");
            }
        }

       
        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
            
        }
    }
}